﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="renyuanxx.aspx.cs" Inherits="TradeTestWeb.renyuanxx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
    <style type="text/css">
        .datagrid-body
        {
            margin: 0;
            padding: 0;
            overflow: auto;
        }
    </style>
    <script type="text/javascript">
        $(function () {
            $("#KAHAO").val(getvalue("KAHAO"));
            $("#duka").click(function () {
                setvalue("KAHAO");
                setvalue("kaleixing");
                $.post("Default.aspx/tradejson", { jyname: "RENYUANXX", canshu: getkv() }, function (json) {
                    //alert(htmlDecode(json.result));
                    $("#outxml").html(json.result);
                }, "json");
            });
        });

        function htmlDecode(str) {
            var s = "";
            if (str.length == 0) return "";
            s = str.replace(/&amp;/g, "&");
            s = s.replace(/&lt;/g, "<");
            s = s.replace(/&gt;/g, ">");
            s = s.replace(/&#39;/g, "\'");
            s = s.replace(/&quot;/g, "\"");
            return s;
        }

        function setvalue(name) {
            window.localStorage[name] = $("#" + name).val();
        }
        function getvalue(name) {
            return window.localStorage[name];
        }

        function getkv() {
            var kvs = "";
            for (var item in window.localStorage) {
                kvs += item + "=" + window.localStorage[item] + "|";
            }
            return kvs;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="datagrid-body">
        <select id="kaleixing">
            <option value="1">医保卡号</option>
            <option value="2">医疗证号</option>
        </select>
        <input type="text" id="KAHAO" value="" />
        <input type="button" id="duka" value="读卡" />
        <fieldset>
            <legend>人员信息</legend>
            <textarea id="outxml"></textarea>
        </fieldset>
    </div>
    </form>
</body>
</html>
